﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TOOLS;

// 员工类
namespace BLL
{
    public class Person
    {

        public Person()
        {
        }

        public Person(string personId, string personName, string gender, int age, string address, string phoneNum, string departmentName, string idNum, string isDel)
        {
            PersonID = personId;
            PersonName = personName;
            Gender = gender;
            Age = age;
            IdNum = idNum;
            PhoneNum = phoneNum;
            DepartmentName = departmentName;
            Address = address;
            IsDel = isDel;
        }

        public string PersonID { get; set; }

        [Export(Name = "姓名")]
        public string PersonName { get; set; }

        [Export(Name = "性别")]
        public string Gender { get; set; }

        [Export(Name = "年龄")]
        public int Age { get; set; }

        [Export(Name = "身份证")]
        public string IdNum { get; set; }

        [Export(Name = "手机号")]
        public string PhoneNum { get; set; }

        [Export(Name = "部门")]
        public string DepartmentName { get; set; }

        [Export(Name = "地址")]
        public string Address { get; set; }
       
        [Export(Name = "状态", Format = "0=在职,1=离职")]
        public string IsDel { get; set; }


        public override string ToString()
        {
            return $"PersonID:{PersonID},IdNum:{IdNum},PersonName:{PersonName},Gender:{Gender},Age:{Age},Address:{Address},PhoneNum:{PhoneNum},DepartmentName:{DepartmentName}";
        }
    }
}
